<template>
  <div id="app">
    <!--    <sidebar v-show="!(path ==='/')"></sidebar>-->
    <blog_header v-show="!(path==='/')"></blog_header>
    <router-view></router-view>
  </div>
</template>

<script>


  import Header from "./components/Header";

  export default {
    name: 'App',
    data() {
      return {
        path: ''
      }
    },
    components: {
      blog_header: Header
    },
    // 判断路由
    mounted() {
      this.path = this.$route.path
      // console.log("判断路由" + this.$route.path)
    },
    watch: {
      $route(to, from) {
        this.path = to.path
        // console.log(this.path);
      },
      deep: true,
      immediate: true,
    }
  }
</script>

<style scoped>
</style>
